package com.ruoyi.dream.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dream.mapper.EduProgramMapper;
import com.ruoyi.dream.domain.EduProgram;
import com.ruoyi.dream.service.IEduProgramService;
import com.ruoyi.common.core.text.Convert;

/**
 * 培养方案管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class EduProgramServiceImpl implements IEduProgramService 
{
    @Autowired
    private EduProgramMapper eduProgramMapper;

    /**
     * 查询培养方案管理
     * 
     * @param programId 培养方案管理主键
     * @return 培养方案管理
     */
    @Override
    public EduProgram selectEduProgramByProgramId(Long programId)
    {
        return eduProgramMapper.selectEduProgramByProgramId(programId);
    }

    /**
     * 查询培养方案管理列表
     * 
     * @param eduProgram 培养方案管理
     * @return 培养方案管理
     */
    @Override
    public List<EduProgram> selectEduProgramList(EduProgram eduProgram)
    {
        return eduProgramMapper.selectEduProgramList(eduProgram);
    }

    /**
     * 新增培养方案管理
     * 
     * @param eduProgram 培养方案管理
     * @return 结果
     */
    @Override
    public int insertEduProgram(EduProgram eduProgram)
    {
        eduProgram.setCreateTime(DateUtils.getNowDate());
        return eduProgramMapper.insertEduProgram(eduProgram);
    }

    /**
     * 修改培养方案管理
     * 
     * @param eduProgram 培养方案管理
     * @return 结果
     */
    @Override
    public int updateEduProgram(EduProgram eduProgram)
    {
        eduProgram.setUpdateTime(DateUtils.getNowDate());
        return eduProgramMapper.updateEduProgram(eduProgram);
    }

    /**
     * 批量删除培养方案管理
     * 
     * @param programIds 需要删除的培养方案管理主键
     * @return 结果
     */
    @Override
    public int deleteEduProgramByProgramIds(String programIds)
    {
        return eduProgramMapper.deleteEduProgramByProgramIds(Convert.toStrArray(programIds));
    }

    /**
     * 删除培养方案管理信息
     * 
     * @param programId 培养方案管理主键
     * @return 结果
     */
    @Override
    public int deleteEduProgramByProgramId(Long programId)
    {
        return eduProgramMapper.deleteEduProgramByProgramId(programId);
    }
}
